/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * AgregarAlumnoView.java
 *
 * Created on 26-abr-2012, 15:46:24
 */
package educar.abmAlumno;

import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JTextField;

/**
 *
 * @author Flubber
 */
public class AgregarAlumnoView extends javax.swing.JDialog {

 // <editor-fold defaultstate="collapsed" desc="Constructor">
    public AgregarAlumnoView() {
        initComponents();
    }
// </editor-fold>
  
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jtTitulo = new javax.swing.JLabel();
        jnroAlumno = new javax.swing.JLabel();
        jdni = new javax.swing.JLabel();
        jnombreYapellido = new javax.swing.JLabel();
        jDireccion = new javax.swing.JLabel();
        jtfNroAlumno = new javax.swing.JTextField();
        jtfDni = new javax.swing.JTextField();
        jtfNombreYApellido = new javax.swing.JTextField();
        jtfDireccion = new javax.swing.JTextField();
        jbAceptar = new javax.swing.JButton();
        jbCancelar = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

        jtTitulo.setFont(new java.awt.Font("Tahoma", 1, 15)); // NOI18N
        jtTitulo.setText("Agregar Nuevo Alumno");

        jnroAlumno.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jnroAlumno.setText("Nro. Alumno");

        jdni.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jdni.setText("DNI");

        jnombreYapellido.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jnombreYapellido.setText("Nombre y Apellido");

        jDireccion.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jDireccion.setText("Direccion");

        jbAceptar.setText("Aceptar");

        jbCancelar.setText("Cancelar");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(107, Short.MAX_VALUE)
                .addComponent(jtTitulo, javax.swing.GroupLayout.PREFERRED_SIZE, 212, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(81, 81, 81))
            .addGroup(layout.createSequentialGroup()
                .addGap(29, 29, 29)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(jnombreYapellido, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jdni, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jnroAlumno, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addGap(26, 26, 26))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jbAceptar, javax.swing.GroupLayout.DEFAULT_SIZE, 133, Short.MAX_VALUE)
                            .addComponent(jDireccion, javax.swing.GroupLayout.DEFAULT_SIZE, 133, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                        .addComponent(jtfNombreYApellido)
                        .addComponent(jtfDni)
                        .addComponent(jtfNroAlumno, javax.swing.GroupLayout.DEFAULT_SIZE, 224, Short.MAX_VALUE))
                    .addComponent(jtfDireccion, javax.swing.GroupLayout.DEFAULT_SIZE, 224, Short.MAX_VALUE)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(85, 85, 85)
                        .addComponent(jbCancelar, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jtTitulo, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jnroAlumno, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jtfNroAlumno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jdni, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jtfDni, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(33, 33, 33)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jnombreYapellido)
                    .addComponent(jtfNombreYApellido, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(29, 29, 29)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jDireccion, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jtfDireccion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jbAceptar, javax.swing.GroupLayout.DEFAULT_SIZE, 43, Short.MAX_VALUE)
                    .addComponent(jbCancelar, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

// <editor-fold defaultstate="collapsed" desc="Declaracion de variables">    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jDireccion;
    private javax.swing.JButton jbAceptar;
    private javax.swing.JButton jbCancelar;
    private javax.swing.JLabel jdni;
    private javax.swing.JLabel jnombreYapellido;
    private javax.swing.JLabel jnroAlumno;
    private javax.swing.JLabel jtTitulo;
    private javax.swing.JTextField jtfDireccion;
    private javax.swing.JTextField jtfDni;
    private javax.swing.JTextField jtfNombreYApellido;
    private javax.swing.JTextField jtfNroAlumno;
    // End of variables declaration//GEN-END:variables
// </editor-fold>
    
// <editor-fold defaultstate="collapsed" desc="GetAlumno">    
  

    public JButton getJbAceptar() {
        return jbAceptar;
    }

    public JButton getJbCancelar() {
        return jbCancelar;
    }

    public String getDireccion() {
        return jtfDireccion.getText();
    }

    public String getDni() {
        return jtfDni.getText();
    }

    public String getNombreYApellido() {
        return jtfNombreYApellido.getText();
    }
    
    public String getNroAlumno() {
        return jtfNroAlumno.getText();
    }  
    
    public void setActionListener(ActionListener listener) {
        jbAceptar.addActionListener(listener);
        jbCancelar.addActionListener(listener);
    }
    
    public void setWindowListener(AgregarAlumnoController listener){
        this.addWindowListener(listener);
    }
     public void setTitulo(String Titulo) {
        this.jtTitulo.setText(Titulo);
    }
     
    public void setDireccion(String Direccion) {
        this.jtfDireccion.setText(Direccion);
    }

    public void setfDni(String Dni) {
        this.jtfDni.setText(Dni);
    }

    public void setNombreYApellido(String NombreYApellido) {
        this.jtfNombreYApellido.setText(NombreYApellido);
    }

    public void setnroAlumno (String nroAlumno) {
        this.jtfNroAlumno.setText(nroAlumno);
    }

     
// </editor-fold> 

    
}
